#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
  ll a, b, k;
  int cnt = 0;
  cin >> a >> b >> k;
  while (a < b) {
    a *= k;
    cnt++;
  }
  cout << cnt << endl;
}
